package kr.ac.kongju.gedl.attach.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import kr.ac.kongju.gedl.attach.vo.AttachFileVO;
import kr.ac.kongju.gedl.common.util.ListResultVO;

public interface AttachFileService {

	/**
	 * registerAttachFile
	 * AttachFile 등록
	 * @param attachFile
	 * @return AttachFileVO
	 */
	public abstract AttachFileVO registerAttachFile(AttachFileVO attachFile);
	
	
	/**
	 * registerAttachFileList
	 * AttachFile 등록
	 * @param List<AttachFileVO> attachFileList
	 * @return List<AttachFileVO> attachFileList
	 */
	public abstract List<AttachFileVO> registerAttachFileList(List<AttachFileVO> attachFileList);

	/**
	 * retrieveAttachFile
	 * AttachFile 조회
	 * @param attachFile
	 * @return AttachFileVO
	 */
	public abstract AttachFileVO retrieveAttachFile(AttachFileVO attachFile);

	/**
	 * updateAttachFile
	 * AttachFile 갱신
	 * @param attachFile
	 * @return AttachFileVO
	 */
	public abstract int updateAttachFile(AttachFileVO attachFile);

	/**
	 * updateListAttachFile
	 * AttachFile 갱신
	 * @param attachFile (targetTable, targetId, useYn)
	 * @return AttachFileVO
	 */
	public abstract int updateListAttachFile(AttachFileVO attachFile);

	/**
	 * deleteAttachFile
	 * AttachFile 삭제
	 * 물리적인 경로의 첨부파일도 함께 삭제한다
	 * @param attachFile
	 * @return AttachFileVO
	 */
	public abstract int deleteAttachFile(AttachFileVO attachFile);

	/**
	 * deleteListAttachFile
	 * AttachFile List 삭제
	 * 물리적인 경로의 첨부파일도 함께 삭제한다
	 * @param SearchVO
	 * @return int deleted row count
	 */
	public abstract int deleteListAttachFile(AttachFileVO searchCondition);

	/**
	 * deleteListAttachFile
	 * AttachFile List 삭제
	 * @param targetTable, targetId
	 * @return int deleted row count
	 */
	public abstract int deleteListAttachFile(String targetTable, String targetId);

	/**
	 * retrieveListCountAttachFile
	 * AttachFile 검색결과 수
	 * @param SearchVO
	 * @return
	 */
	public abstract int retrieveListCountAttachFile(AttachFileVO searchCondition);

	/**
	 * retrieveListAttachFile
	 * AttachFile 검색
	 * @param AttachFileVO
	 * @return
	 */
	public abstract ListResultVO<AttachFileVO> retrieveListAttachFile(
			AttachFileVO searchCondition);
	
	
	public List<AttachFileVO> selectListAttachFile(AttachFileVO searchCondition);

	/**
	 * 경로에 해당하는 파일 삭제
	 * @param source
	 * @return
	 */
	public abstract boolean deleteAttachRealFile(AttachFileVO attachFile);

}